﻿using System;

namespace MslDiary.ViewModel
{
    /// <summary>
    /// 用来管理ViewModel类的
    /// </summary>
    public class ViewModelLocator 
    {
        static ViewModelLocator()
        {

        }
        private ItemListViewModel _ItemViewModel;
        private NoteListViewModel _NoteViewModel;
        private MainWindowViewModel _MainViewModel;
        private AboutViewModel _AboutViewModel;
        private DiaryListViewModel _DiaryViewModel;
        private ConfigViewModel _ConfigViewModel;
        private LoginWindowViewModel _LoginModel;
        private RemoveLockViewModel _reLockViewModel;
        private AddAttachFileViewModel _attachFileViewModel;
        private SkinListViewModel _skinViewModel;
        private EditorListSkinViewModel _editorSkinViewModel;
        public EditorListSkinViewModel EditorSkinViewModel
        {
            get
            {
                if (_editorSkinViewModel == null)
                    _editorSkinViewModel = new EditorListSkinViewModel();
                return _editorSkinViewModel;
            }
        }
        public SkinListViewModel SkinViewModel
        {
            get
            {
                if (_skinViewModel == null)
                    _skinViewModel = new SkinListViewModel();
                return _skinViewModel;
            }
        }
        public AddAttachFileViewModel AttachFileViewModel
        {
            get
            {
                if (_attachFileViewModel == null)
                    _attachFileViewModel = new AddAttachFileViewModel();
                return _attachFileViewModel;
            }
        }
        public RemoveLockViewModel ReLockViewModel
        {
            get
            {
                if (_reLockViewModel == null)
                    _reLockViewModel = new RemoveLockViewModel();
                return _reLockViewModel;
            }
        }
        public LoginWindowViewModel LoginViewModel
        {
            get
            {
                if (_LoginModel == null)
                    _LoginModel = new LoginWindowViewModel();
                return _LoginModel;
            }
        }
        public ConfigViewModel ConfigViewModel
        {
            get
            {
                if (_ConfigViewModel == null)
                    _ConfigViewModel = new ConfigViewModel();
                return _ConfigViewModel;
            }
        }
        public DiaryListViewModel DiaryViewModel
        {
            get
            {
                if (_DiaryViewModel == null)
                    _DiaryViewModel = new DiaryListViewModel();
                return _DiaryViewModel;
            }
        }
        public MainWindowViewModel MainViewModel
        {
            get
            {
                if (_MainViewModel == null)
                    _MainViewModel = new MainWindowViewModel();
                return _MainViewModel;
            }
        }
        public AboutViewModel AboutFormViewModel
        {
            get
            {
                if (_AboutViewModel == null)
                    _AboutViewModel = new AboutViewModel();
                return _AboutViewModel;
            }
        }
        public NoteListViewModel NoteViewModel
        {
            get
            {
                if (_NoteViewModel == null)
                    _NoteViewModel = new NoteListViewModel();
                return _NoteViewModel;
            }
        }
        public ItemListViewModel ItemViewModel
        {
            get
            {
                if (_ItemViewModel == null)
                    _ItemViewModel = new ItemListViewModel();
                return _ItemViewModel;
            }
        }
    }
}
